package demo02;

public class StateOn extends StateBubble {
    private Bubble bubble;

    public StateOn() {
    }

    public StateOn(Bubble bubble) {
        this.bubble = bubble;
    }

    @Override
    public void on() {
        System.out.println("bubble on");
        bubble.setStateBubble(bubble.getStateOn());

    }

    @Override
    public void off() {
        System.out.println("bubble 已经 off");
    }
}
